#include<stdio.h>
#include<math.h>
#include<signal.h>
#include<pthread.h>
int const number_of_mobiles=10;
void ctrlc()
{
exit(0);
}
void *hello_world(void *arg)
{
printf("Hello world\n");
return NULL;
}



int main()
{
pthread_t hello_id;

int ret,pid[10];

printf("This is node program\n ");

/*ret=pthread_create(&hello_id,NULL,hello_world,NULL);
//if(ret!=0)
printf("process hello world created %d\n",ret);

ret=pthread_join(hello_id,NULL);
if(ret!=0)
printf("thread joined");
*/
pid[0]=fork();
if(pid[0]==0)
{
printf("This is child %d\n",pid[0]);
pid[1]=fork();
if(pid[1]==0)
printf("This is child's child %d\n",pid[1]);
else
printf("This is the original child\n");
}else
{
printf("This is parent \n ");
}
signal(SIGINT,ctrlc);
while(1)
continue;
}
